/*
 * Enemy.cpp
 *
 *  Created on: Apr 20, 2012
 *      Author: builder
 */

#include "Enemy.h"

void Enemy::initialize(string i_name, int i_att, int i_def, int i_spd, int i_health, int i_reward ) {
	name = i_name;
	att = i_att;
	def = i_def;
	spd = i_spd;
	health = i_health;
	reward = i_reward;
}

void Enemy::fight_mode () {
	srand ( time(NULL) );
	int num = rand() % 3;

		// offensive position
	if ( num ==  0 ) {
		cout << name << " goes into an aggressive stance" << endl;
		fight_att = (att*13)/10;
		fight_def = (def*7)/10;

		// defensive position
	} else if ( num == 1 ) {
		cout << name << " retreats to an defensive posture" << endl;
		fight_att = (att*7)/10;
		fight_def = (def*13)/10;

		// normal position
	} else {
		cout << name << " looks to attack normally" << endl;
		fight_att = att;
		fight_def = def;
	}

	//sleep(1);
}


Enemy::~Enemy() {
	// TODO Auto-generated destructor stub
}
